DviHP 2.1

User’s Manual

\begin{matrix}c \\ ◯ \end{matrix} Copyright Aleš Pečnik, 1993, 1994 All Rights Reserved.

Contents

1 Legal Stuff 3 1.1 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Shareware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.5 Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.6 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.7 Questions, User Support . . . . . . . . . . . . . . . . . . . . . . . 4

2 Introduction 4 2.1 Changes from version 2.0 . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Installation 5

4 Running DviHP 6

4.1 From CLI/Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.1.1 FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1.2 F=FROM/K/N . . . . . . . . . . . . . . . . . . . . . . . 7 4.1.3 T=TO/K/N . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1.4 E=EVEN/S, O=ODD/S . . . . . . . . . . . . . . . . . . 7 4.1.5 C=COPIES/K/N . . . . . . . . . . . . . . . . . . . . . . 7 4.1.6 L=LANDSCAPE/S . . . . . . . . . . . . . . . . . . . . . 7 4.1.7 R=RESOLUTION/K/N . . . . . . . . . . . . . . . . . . . 8 4.1.8 X=XOFFSET/K/N, Y=YOFFSET/K/N . . . . . . . . . 8 4.1.9 OUT/K . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1.10 FP=FONTPATH/K . . . . . . . . . . . . . . . . . . . . . 8 4.1.11 PER=PERMANENT/S . . . . . . . . . . . . . . . . . . . 8 4.1.12 RF=REMOVEFONTS/S . . . . . . . . . . . . . . . . . . 8 4.1.13 SHOWFONTS/S . . . . . . . . . . . . . . . . . . . . . . . 9 4.1.14 PCL5/S . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.1.15 DLF=DOWNLOADFILE/K . . . . . . . . . . . . . . . . 9 4.1.16 REQ=REQUESTERS/S . . . . . . . . . . . . . . . . . . 10

4.2 From Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5 Saving DviHP parameters 10

6 DviHP Fonts 10 7 Printing IFF ILBM Files 11

7.1 General Information . . . . . . . . . . . . . . . . . . . . . . . . . 11 7.2 Using the TEX Macro “\centeriff” . . . . . . . . . . . . . . . . . 12 7.3 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

8 Including PostScript Files 12 8.1 General Information . . . . . . . . . . . . . . . . . . . . . . . . . 12 8.2 Using the TEX Macro “\centerps” . . . . . . . . . . . . . . . . . 13 8.3 Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

9 Registration 14

1 Legal Stuff

1.1 Copyright

The DviHP executable and documentation are protected by Copyright. All Rights Reserved. You are entitled to use the program and related files in original form only. You may not reverse engineer, decompile, disassemble or derive a work based on this work in whole or in part.

1.2 Shareware

This program is made available through the concept of “Shareware” which is a form of distribution that gives you the opportunity to try a piece of software before you buy it. It is not regarded as Public Domain or otherwise “free” software.

1.3 License

You are granted a limited license to evaluate this software for a 30 day period on a private, non-commercial basis only. You must decide at the termination of this evaluation period to register this product if you plan to continue using it or cease all use otherwise.

1.4 Disclaimer

No warranties are implied or expressed with regard to the fitness or merchantability of DviHP for any particular purpose. All risks and damages, incidental or otherwise, arising through the use or misuse of DviHP are entirely at the responsibility of the user.

While considerable effort has been made to provide you with a reliable product, there is no guarantee that this program is 100% “bug-free”. Additionally, this disclaimer does not guarantee future versions of this product, but maintenance releases may be made available if and when feasible.

1.5 Distribution

Distribution is limited to the original shareware distribution archive file only. None of the member files may be omitted. Furthermore, no profit or other material gain may be realized for distributing DviHP with the sole exception of recovery for media and postage. Bundling DviHP, the distribution archive or any member files, with any commercial product is expressly prohibited prior to obtaining a “Commercial Distribution Agreement”.

Explicit permission is given to distribute DviHP as a part of public domain/shareware disk libraries.

1.6 Acknowledgements

I would like to thank to Matej Skobe for bug reports and suggestions and to Thomas Ganther for a very thorough beta testing on HP LaserJet 4, lots of suggestions and (I reluctantly admit) a few bug reports.

1.7 Questions, User Support

Should you have any questions concerning the use of DviHP or registration, please contact the author:

Aleš Pečnik Skopska 6 SI-61000 Ljubljana Slovenia

You can also contact me via e-mail (alesp@freeport.uwasa.fi) or FidoNet (Ales Pecnik, 2:380/102).

2 Introduction

DviHP version 2.1 is a program that prints DVI files (generated by TEX) on a HP LaserJet or compatibile printer.

2.1 Changes from version 2.0

• The FILE keyword can be omitted from now on.

• New options XOFFSET and YOFFSET let you change initial printing position.

• New graphical user interface.

• Improved break (CTRL–C) handling; DviHP will now abort almost immediately — version 2.0 aborted after it has downloaded current font.

• Downloaded fonts can be made permanent.

• DviHP will show you which fonts have been downloaded previously.

• Uses PJL (printer job language) if PCL5 switch is set.

• DviHP is now capable of downloading real 600 dpi fonts.

• DviHP 2.1 introduces “download files”. You can pre-download some fonts.

2.2 Features

• DviHP downloads fonts to printer; printing is therefore much faster, especially when printing large documents. Version 2.1 uses PCL5 font compression.

• I tried to make DviHP as user friendly as possible; you can set parameters through environmental variable “DVIHPOPTS”, in a command-line when invoking it from CLI or Shell, via ToolTypes when invoking it from Workbench or via graphical user interface.

• It supports printing in landscape orientation.

• DviHP allows you to include IFF ILBM files (raster pictures) and PostScript files in your documents.

• DviHP lets you redirect output to a file, even when you’re printing IFF ILBM pictures and/or PostScript files.

2.3 Requirements

• Any Amiga with OS 2.04 or higher

• A HP LaserJet compatibile printer

• post.library (\begin{matrix}c \\ ◯ \end{matrix} Adrian Aylward) for printing PostScript files (see section “Printing PostScript Files: General Information”)

3 Installation

Files in this package:

• DviHP — Executable,
• DviHP.info — Icon for DviHP,
• DviHP−doc.dvi — User’s Manual in DVI format,
• DviHPmac.tex — TEX macros for DviHP.

DviHP (the executable) and DviHP.info (the icon) should be copied to any directory — both files to the same directory. Copy DviHPmac.tex file to TeX:macros directory. DviHP−doc.dvi can be copied to any directory.

4 Running DviHP

4.1 From CLI/Shell

Short help is available by typing:

DviHP ?

DviHP will type the following text:

FILE,F=FROM/K/N,T=TO/K/N,E=EVEN/S,O=ODD/S,C=COPIES/K/N,
L=LANDSCAPE/S,R=RESOLUTION/K/N,X=XOFFSET/K/N,Y=YOFFSET/K/N,
OUT/K,FP=FONTPATH/K,PER=PERMANENT/S,RF=REMOVEFONTS/S,
SHOWFONTS/S,PCL5/S,DLF=DOWNLOADFILE/K,REQ=REQUESTERS/S:

Additional help is available by entering the question mark (“?”) at the prompt:

[<dvi-filename>[.dvi]] [F=FROM <pagenumber>] [T=TO <pagenumber>]
[E=EVEN] [O=ODD] [C=COPIES <# of copies>] [L=LANDSCAPE]
[R=RESOLUTION <dpi>] [X=XOFFSET <points>] [Y=YOFFSET <points>]
[OUT <output-filename>] [FP=FONTPATH <font-path>] [PER=PERMANENT]
[RF=REMOVEFONTS] [SHOWFONTS] [PCL5] [DLF=DOWNLOADFILE <dl-file>]
[REQ=REQUESTERS]
Defaults  are:  <dvi-filename>=<none>, from page 0 to page 10000,
even  and  odd  pages (switches disabled in shareware version), 1
copy   (keyword   disabled   in   shareware   version),  portrait
orientation,  resolution  300  dpi, x and y offset 0, output PAR:
(keyword  disabled  in  shareware version), fontpath TeX:FontLib,
make  fonts  temporary  (switch  disabled  in shareware version),
don't remove fonts, don't show downloaded fonts (less information
in   shareware  version),  don't  use  PCL5,  no  download  file,
requesters off.
Please register if you often use this program.
:

4.1.1 FILE

Through this keyword you can specify the name of the DVI file. The “.DVI” extension may be omitted. This option isn’t required anymore, you can for example only remove fonts:

DviHP REMOVEFONTS

or list fonts which have already been downloaded:

DviHP SHOWFONTS

4.1.2 F=FROM/K/N

Lets you specify the first page to be printed. Number may be out of range (e.g. if you specify starting page 0, DviHP will print all pages numbered 0 or higher).

4.1.3 T=TO/K/N

Lets you specify the last page to print. Number may be out of range.

4.1.4 E=EVEN/S, O=ODD/S

If you include one of the keywords above in the command line, only even/odd pages will be printed. Keywords may be omitted; default is “all” pages (i.e. even and odd).

These switches are disabled in shareware version.

4.1.5 C=COPIES/K/N

Lets you specify the number of copies you want. It may be omitted; the default is one copy.

This keyword is disabled in shareware version.

4.1.6 L=LANDSCAPE/S

The keyword “L” or “LANDSCAPE” tells DviHP to print in landscape orientation. If the keyword is omitted, DviHP prints in portrait orientation. See sections “Printing IFF ILBM files” and “Including PostScript Files” for additional information regaring the landscape orientation.

4.1.7 R=RESOLUTION/K/N

This keyword tells DviHP what the resolution (in dots per inch) of your printer is. Most printers print at 300 dpi (dots per inch), the newer ones (like some HP LaserJet 4’s) print at 600 dpi. If this keyword is omitted, DviHP assumes that your printer prints at the default resolution (300 dpi).

You can determine maximum resolution of your printer by using keyword “R 600”. If your printer reports data error or if characters are twice as large as they should be, then your printer prints only at 300 dpi.

4.1.8 X=XOFFSET/K/N, Y=YOFFSET/K/N

TEX’s default origin is 1 inch from left and 1 inch from top edge. With these keywords you can move the origin. Keyword must be followed by a number of dots — either positive or negative. Value is resolution dependent. For example, when using resolution 300 dpi, 1 means 1/300”.

Positive values move origin towards right/bottom, negative values towards left/top edge of paper.

4.1.9 OUT/K

By using this keyword you can redirect DviHP’s output to a file. The default output file is “PAR:” (parallel port).

IMPORTANT! Do not set output file to “PRT:”. The PRT device will attempt to “re-translate” DviHP’s output; this will lead to unpredictable results.

This keyword is disabled in shareware version.

4.1.10 FP=FONTPATH/K

The default font directory is “TeX:FontLib”. If you use this keyword, you can choose another directory.

Please see the “DviHP Fonts” section for additional information.

4.1.11 PER=PERMANENT/S

If this switch is set, downloaded fonts will be made permanent, i.e. not deletable by the reset command.

This switch is disabled in shareware version.

4.1.12 RF=REMOVEFONTS/S

This switch tells DviHP to remove fonts from memory after it has finished printing. If specified, DviHP will send a command to printer telling it to remove fonts from its memory and free the Amiga’s font data memory.

4.1.13 SHOWFONTS/S

If this switch is set, DviHP will first show all the fonts which have been previously downloaded, their sizes and their font IDs for portait and landscape fonts.

Font IDs won’t be shown in shareware version.

4.1.14 PCL5/S

Set this switch if your printer understands PCL5. If you print at resolution other than 300 dpi, this switch has to be set.

This switch enables:

• use of PJL (printer job language), • fonts with resolution other than 300 dpi,

• font compression.

4.1.15 DLF=DOWNLOADFILE/K

This keyword is very useful if you print often. This option should be followed by a file name. You can add the following lines to you s:User-Startup file:

run ChangeTaskPri pri -5 +
DviHP DOWNLOADFILE a_file

This will launch DviHP at low priority. DviHP will download fonts specified in download file, so when you decide to print something, fonts will have already been downloaded.

An example of download file:

% This is an example download file for DviHP.
% Format of the file is:
% [white-space]<font-name><white-space><font-size>[white-space]
% White-space means any number of spaces or tabulator signs.
% These lines are all valid:
% a comment; the % sign should be the first character in a row
% Empty lines are allowed.
cmr10 300
cmr12   300
        cmbx10 300
  cmbx12  300
% The following lines are invalid:
 % The '%' sign is not the first character in the row
cmr12 360 % same error, nothing is allowed after font size except
%           for white space

4.1.16 REQ=REQUESTERS/S

This switch will produce a requester, which is pretty self-explanatory. Requires asl.library.

4.2 From Workbench

Double click on the DviHP icon. You can also set tooltypes — keywords are same as those for invoking DviHP from CLI/Shell (but may not be abbreviated!).

5 Saving DviHP parameters

When invoked (from either CLI/Shell or Workbench), DviHP will first read the environmental variable “DVIHPOPTS”. Keywords and values for this variable are the same as for invoking DviHP from CLI/Shell or Workbench and can be abbreviated. Possible ways of setting the environmental variable are:

setenv DVIHPOPTS "<options>"
set DVIHPOPTS "<options>"
echo >ENV:DVIHPOPTS "<options>" NOLINE

(Consult your AmigaDOS manual for details about “setenv”, “set” and “echo”.)

For example:

setenv DVIHPOPTS "EVEN ODD RESOLUTION 300 RF"

6 DviHP Fonts

DviHP uses the same fonts as other DVI drivers. Fonts should be compressed (PK). The default directory is “TeX:FontLib” — if your fonts are located in another directory, use the “FP=FONTPATH” keyword/tooltype to specify this directory.

Possible font-file formats:

• font libraries: Fonts may be packed into libraries with PasTEX’s (\begin{matrix}c \\ ◯ \end{matrix} Georg Hessmann) utility “flib”. Font libraries’ filenames should be of form: PK????, e.g. PK0300; font filenames (items in libraries) should be of form cm??, e.g. cmr10, cmbx10, cmsy8, etc. or cm??.???, e.g. cmr10.pk, cmbx10.300pk, etc.

• PK files: Filenames should be of form: cm??.??pk, e.g. cmr10.360pk, cmbx12.300pk. Font files may be sorted to different directories according to font size, e.g. 360/cmr10.360pk, 300/cmbx12.300pk. If fonts are sorted to directories, font names can also be of form e.g. 360/cmr10.pk, 300/cmbx12.pk

If DviHP can’t find a font, it will write the following message:

*** Font cmr10 (360 or 361 pt) not found!
New font name (e.g. cmr10), q to quit, blank for same:

At this point you can specify another font name. For example, font cmr12 at 300 pt has similar size as font cmr10 at 360 pt. So you can type “cmr12”. If you wish to abort program, type “q”. If font name is to remain the same (in this case, “cmr10”), you can type its name or just press the return key.

After DviHP has asked you about font name, it will ask about the font size:

New font size (e.g. 300), q to quit, blank for same:

You can now choose a different or the same font size or abort. If you decide not to abort, DviHP will try to find the new font. If it can’t find it, it will re-type the same message.

7 Printing IFF ILBM Files

7.1 General Information

To include an IFF ILBM file into your document, use TEX’s “\special” command:

\special{ifffile <filename> <location> <width> <height>}

The keyword “ifffile” tells DviHP that the following information describes an IFF ILBM file. “<filename>” is any valid AmigaDOS file name, e.g. “Pictures:mypicture.iff” (no quotes!). “<location>” tells DviHP where to place picture. Picture’s top border is always at the TEX’s current point, left edge can be at TEX’s current point (location=1) or at the left edge of the paper (location=0). “<width>” and “<height>” define the size of the picture. Valid units are:

Also valid for TEX

• pt,  1pt = \frac{1}{72.27}”
• pc,  1pc = \frac{12}{72.27}”
• in,  1in = 1”
• cm,  1cm = \frac{1}{2.54}”
• mm, 1mm = \frac{1}{25.4}”
• bp,  1bp = \frac{1}{72}”

Only valid for DviHP

• ppt, 1ppt = printer specific, i.e. \frac{1}{300}” or \frac{1}{600}”

IMPORTANT! There should be a space between number and unit, e.g. 12␣pt, 2␣in, etc. TEX doesn’t require a space between them, but DviHP does. If there’s no space, DviHP will produce an error (“Invalid units, using default: ppt”).

7.2 Using the TEX Macro “\centeriff”

You can use this macro to center the picture horizontally. Usage:

\centeriff{width}{height}{filename}

IMPORTANT! Width and height must be defined in units that are valid for both, TEX and DviHP (pt, pc, in, cm, mm, bp). There should be a space between number and unit, e.g. 12␣pt, 2␣in, etc. TEX doesn’t require a space between them, but DviHP does. If there’s no space, DviHP will produce an error (“Invalid units, using default: ppt”).

7.3 Limitations

• DviHP is currently not able to correctly print IFF pictures in landscape orientation, because it isn’t able to rotate them. To print IFF pictures in landscape mode, first rotate them for 90^{∘} with another (graphics) program.

• You should calculate the correct width and height by yourself. Setting one of the width or height to zero will produce an error.

8 Including PostScript Files

8.1 General Information

To include PostScript files in your documents you’ll need Adrian Aylward’s package “Post”, or — to be exact — post.library, which is included in this package.

To include a PostScript file into your document, use TEX’s “\special” command:

\special{psfile <location> <width> <height> <file_1>..<file_n>}

The keyword “psfile” tells DviHP that the following information describes a PostScript file. “<file n>” is any valid AmigaDOS file name, e.g. “PS:test.ps” (no quotes!). Typically, the first file would be “init.ps” (included in the “Post” package). There can be up to five files. Keyword “<location>” tells DviHP where to place picture. Picture’s top border is always at the TEX’s current point, left edge can also be at TEX’s current point (location=1) or at the left edge of the paper (location=0). “<width>” and “<height>” define the size of the picture. For description of valid units see section “Printing IFF ILBM Files: General Information”.

IMPORTANT! There should be a space between number and unit, e.g. 12␣pt, 2␣in, etc. TEX doesn’t require a space between them, but DviHP does. If there’s no space, DviHP will produce an error (“Invalid units, using default: ppt”).

8.2 Using the TEX Macro “\centerps”

You can use this macro to center the picture horizontally. Usage:

\centerps{width}{height}{filename}

Only one file should be specified. Macro will assume that the first file is “PSFonts:init.ps”.

IMPORTANT! Width and height must be defined in units that are valid for both, TEX and DviHP (pt, pc, in, cm, mm, bp). There should be a space between number and unit, e.g. 12␣pt, 2␣in, etc. TEX doesn’t require a space between them, but DviHP does. If there’s no space, DviHP will produce an error (“Invalid units, using default: ppt”).

8.3 Limitation

DviHP doesn’t rotate picture when printing in landscape orientation. You can easily solve this problem: in the first line of your PostScript file write:

90 rotate

9 Registration

When you register, you’ll receive a fully functional copy of DviHP (this one has disabled the EVEN, ODD, COPIES, OUT and PERMANENT keyword; keyword SHOWFONTS isn’t fully functional). You will also receive next versions of DviHP for free/nominal fee (when/if they are released).

Registration fee is $50 (50 US Dollars). Discount is avaiable if ordering 10 or more copies for non-commercial use.

A 68030 version is available to registered users.

To register, fill out the registration form and send it to:

Aleš Pečnik, Skopska 6, SI–61000 Ljubljana, Slovenia.

Registration Form DviHP

Name . . . . . . Surname … Address (1) Address (2) City . . . . . . . Postal Code State . . . . . . Country …

Qty.  Description  Each Total
Registration fee (postage included)  $50.00

If ordering more than 10 and less

less than 25 copies, subtract $2 for each −$2.00

If ordering more than 25

copies, subtract $5 for each  −$5.00

\underline{TOTAL}

Please indicate which version would you like to get:

68000  68030

Discount is available only if you’re ordering for private use or for non-profit organizations! Please remit via international or postal money order. If you remit via cheque and if you’re not from Slovenia, make sure at your bank first that your cheque will be accepted by a foreign (Slovene) bank. Sending cash is at your own risk. By signing this registration form you agree to the provisions and limitations of the license described in the DviHP documentation file. Incomplete registrations will be returned without exceptions.

Signed,